-
Notifications
You must be signed in to change notification settings - Fork 47
Adding subscription-manager InitContainer #721
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fao89 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test all |
Signed-off-by: Fabricio Aguiar <[email protected]>
/test all |
@fao89: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/f9e0f311fbd74adab9da34ddf33139ad ✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 30m 45s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can use a similar design as you've done here, but do it generically. We should avoid hard coding the special handling for the bootstrap service, and the subscription-manager command, etc.
I have 2 ideas how this might work:
-
Add a secret field on the NodeSet, where we set env vars in the ansibleEE based off of every key in that secret. This is very similar to what you've done here, but make it generic. Any ansible content could then consume those secret values from the env vars.
-
Add a secret to the
secrets
list on the bootstrap service. Modify the edpm_bootstrap ansible to read the the secret values when they're mounted into the pod. Make the secret key/values available as host vars withset_fact
. Any command inedpm_bootstrap_command
could then make use of those vars.
Both approaches require the user to know ahead of time the name of the keys they intend to consume with edpm_bootstrap_command
. For instance, I'd need to know to create a secret that has data.username so that I can use {{ username }}
(or whatever we call the env var) in edpm_boostrap_command
. I think this is reasonable as there could be any secret data that could be passed in that we don't have to keep adding support for (org_id or activation key as an example).
I'll try implement 1 |
I've started this: #723 |
Provide a way to execute
subscription-manager register
without exposing the password atedpm_bootstrap_command